home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
ole2book.zip
/
CHAP04.ZIP
/
CHAP04
/
SCHMOO
/
MAKEFILE
< prev
next >
Wrap
Text File
|
1993-03-14
|
3KB
|
120 lines
#
# MAKEFILE
# Schmoo version 2.0 using Polyline Object
#
# Copyright (c)1993 Microsoft Corporation, All Rights Reserved
#
# Kraig Brockschmidt, Software Design Engineer
# Microsoft Systems Developer Relations
#
# Internet : kraigb@microsoft.com
# Compuserve: >INTERNET:kraigb@microsoft.com
#
#Add '#' to the next line for 'noisy' operation
!CMDSWITCHES +s
#
#Compiler flags
#Use "SET RETAIL=1" from MS-DOS to compile non-debug version.
#
!ifndef RETAIL
CFLAGS = -c -nologo -Od -AS -Zipe -G2s -W3 -GA -GEes
LINK = /al:16/ONERROR:NOEXE/CO
DEFS = -DSTRICT -DDEBUG
!else
CFLAGS = -c -nologo -Oas -AS -Zpe -G2s -W3 -GA -GEes
LINK = /al:16/ONERROR:NOEXE
DEFS = -DSTRICT
!endif
!ifdef SDI
DOC = -DSDI
CLASSLIB= classSDI
DIR = SDI
SRC_DIR = ..
!else
DOC = -DMDI
CLASSLIB= classMDI
DIR = MDI
SRC_DIR = ..
!endif
.SUFFIXES: .h .obj .exe .cpp .res .rc
TARGET = schmoo
goal: cd_build $(TARGET).exe cd_src
cd_build:
cd $(DIR)
cd_src:
cd ..
clean:
cd $(DIR)
del *.obj
del *.res
del *.exe
INCLS = $(SRC_DIR)\$(TARGET).h $(SRC_DIR)\resource.h
LIBS = libw slibcew commdlg gizmobar stastrip $(CLASSLIB) compobj
OBJS1 = schmoo.obj
OBJS2 = client.obj
OBJS3 = document.obj
OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
RCFILES1 = $(SRC_DIR)\$(TARGET).ico $(SRC_DIR)\about.dlg
RCFILES2 = $(SRC_DIR)\document.ico $(SRC_DIR)\gizmos.bmp
RCFILES = $(RCFILES1) $(RCFILES2)
#####
{$(SRC_DIR)}.cpp{}.obj:
echo ++++++++++
echo Compiling $*.cpp
cl $(CFLAGS) $(DEFS) $(DOC) $(SRC_DIR)\$*.cpp
{$(SRC_DIR)}.rc{}.res:
echo +++++++++
echo Compiling Resources
rc -r -i$(SRC_DIR) $(DEFS) $(DOC) -fo$@ $(SRC_DIR)\$*.rc
#This rule builds a linker response file on the fly depending on debug flags
$(TARGET).exe : $(OBJS) $(TARGET).res $(SRC_DIR)\$(TARGET).def
echo ++++++++++
echo Linking $@
echo + > $(TARGET).lrf
echo $(OBJS1) + >> $(TARGET).lrf
echo $(OBJS2) + >> $(TARGET).lrf
echo $(OBJS3) >> $(TARGET).lrf
echo $(TARGET) $(LINK) >> $(TARGET).lrf
echo nul/li >> $(TARGET).lrf
echo $(LIBS) /NOD/NOE >> $(TARGET).lrf
echo $(SRC_DIR)\$(TARGET).def >> $(TARGET).lrf
link @$(TARGET).lrf
del $(TARGET).lrf
rc -v $(TARGET).res $(TARGET).exe
##### Dependencies #####
$(TARGET).res : $(SRC_DIR)\$(TARGET).rc $(INCLS) $(RCFILES)
#Application level things
schmoo.obj : $(SRC_DIR)\schmoo.cpp $(INCLS)
client.obj : $(SRC_DIR)\client.cpp $(INCLS)
#Document level things
document.obj : $(SRC_DIR)\document.cpp $(INCLS)